/**
 * 
 */
package info.niwota.frames;

//import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * @author qiangli
 * 
 */
public class ImageList implements IImageList {
	private ArrayList<IImage> list = new ArrayList<IImage>(3);

	public ImageList() {
	}

	public void clear() {
		list.clear();
	}

	public int getCount() {
		return list.size();
	}

	public List<IImage> getImageList() {
		return list;
	}

	public IImage getImageAt(int i) {
		if (i < 0 || i >= list.size()) {
			return null;
		}
		return list.get(i);
	}

	public boolean isEmpty() {
		return (list.size() == 0);
	}

	public boolean removeImageAt(int i) {
		if (i < 0 || i >= list.size()) {
			return false;
		}
		list.remove(i);
		return true;
	}

	public void close() {
		clear();
	}

	public void init() {
	}	
}
